package com.ourteam.product.ui.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-14 15:16:06 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductUIListOptionBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.ui.dao.ProductUIListOption productUIListOption;

  protected BeanMap getBeanMap() {

    return new BeanMap(productUIListOption);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.ui.dao.IProductUIListOptionDAO.Id);

    mappedDaoFields.put("listId", com.ourteam.product.ui.dao.IProductUIListOptionDAO.ListId);

    mappedDaoFields.put("dataValue", com.ourteam.product.ui.dao.IProductUIListOptionDAO.DataValue);

    mappedDaoFields.put("dataLabel", com.ourteam.product.ui.dao.IProductUIListOptionDAO.DataLabel);

    mappedDaoFields.put("dataIcon", com.ourteam.product.ui.dao.IProductUIListOptionDAO.DataIcon);

    mappedDaoFields.put("sortIndex", com.ourteam.product.ui.dao.IProductUIListOptionDAO.SortIndex);

    mappedDaoFields.put(
        "lastModifyUser", com.ourteam.product.ui.dao.IProductUIListOptionDAO.LastModifyUser);

    mappedDaoFields.put(
        "lastModifyTime", com.ourteam.product.ui.dao.IProductUIListOptionDAO.LastModifyTime);

    mappedDaoFields.put("status", com.ourteam.product.ui.dao.IProductUIListOptionDAO.Status);

    mappedDaoFields.put("remarks", com.ourteam.product.ui.dao.IProductUIListOptionDAO.Remarks);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductUIListOptionBean() {
    super();

    this.productUIListOption = new com.ourteam.product.ui.dao.ProductUIListOption();
  }

  public ProductUIListOptionBean(
      com.ourteam.product.ui.dao.ProductUIListOption productUIListOption) {
    super();

    this.productUIListOption = productUIListOption;
  }

  public com.ourteam.product.ui.dao.ProductUIListOption convertToProductUIListOption() {
    return this.productUIListOption;
  }

  public com.ourteam.product.ui.dao.ProductUIListOption convertTo() {
    return this.productUIListOption;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productUIListOption.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productUIListOption.setId(id);
  }

  /**
   * Get listId
   *
   * @return long
   */
  public long getListId() {
    return (long) this.productUIListOption.getListId();
  }

  /**
   * Set listId
   *
   * @parameter long
   */
  public void setListId(long listId) {

    this.productUIListOption.setListId(listId);
  }

  /**
   * Get dataValue
   *
   * @return String
   */
  public String getDataValue() {
    return (String) this.productUIListOption.getDataValue();
  }

  /**
   * Set dataValue
   *
   * @parameter String
   */
  public void setDataValue(String dataValue) {

    this.productUIListOption.setDataValue(dataValue);
  }

  /**
   * Get dataLabel
   *
   * @return String
   */
  public String getDataLabel() {
    return (String) this.productUIListOption.getDataLabel();
  }

  /**
   * Set dataLabel
   *
   * @parameter String
   */
  public void setDataLabel(String dataLabel) {

    this.productUIListOption.setDataLabel(dataLabel);
  }

  /**
   * Get dataIcon
   *
   * @return String
   */
  public String getDataIcon() {
    return (String) this.productUIListOption.getDataIcon();
  }

  /**
   * Set dataIcon
   *
   * @parameter String
   */
  public void setDataIcon(String dataIcon) {

    this.productUIListOption.setDataIcon(dataIcon);
  }

  /**
   * Get sortIndex
   *
   * @return int
   */
  public int getSortIndex() {
    return (int) this.productUIListOption.getSortIndex();
  }

  /**
   * Set sortIndex
   *
   * @parameter int
   */
  public void setSortIndex(int sortIndex) {

    this.productUIListOption.setSortIndex(sortIndex);
  }

  /**
   * Get lastModifyUser
   *
   * @return String
   */
  public String getLastModifyUser() {
    return (String) this.productUIListOption.getLastModifyUser();
  }

  /**
   * Set lastModifyUser
   *
   * @parameter String
   */
  public void setLastModifyUser(String lastModifyUser) {

    this.productUIListOption.setLastModifyUser(lastModifyUser);
  }

  /**
   * Get lastModifyTime
   *
   * @return java.util.Date
   */
  public java.util.Date getLastModifyTime() {
    return (java.util.Date) this.productUIListOption.getLastModifyTime();
  }

  /**
   * Set lastModifyTime
   *
   * @parameter java.util.Date
   */
  public void setLastModifyTime(java.util.Date lastModifyTime) {

    this.productUIListOption.setLastModifyTime(lastModifyTime);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productUIListOption.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productUIListOption.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productUIListOption.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productUIListOption.setRemarks(remarks);
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductUIListOptionBean) == false) {
      return false;
    } // end if

    ProductUIListOptionBean other = (ProductUIListOptionBean) obj;

    boolean isEqual = false;

    com.ourteam.product.ui.dao.ProductUIListOption tempProductUIListOption =
        other.convertToProductUIListOption();

    if (tempProductUIListOption == null || this.productUIListOption == null) {
      isEqual = false;
    } else if (tempProductUIListOption == this.productUIListOption
        || tempProductUIListOption.equals(this.productUIListOption)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductUIListOptionBean[] toArray(
      com.ourteam.product.ui.dao.ProductUIListOption[] aProductUIListOptions) {

    return toArray(aProductUIListOptions, null);
  }

  public static ProductUIListOptionBean[] toArray(
      com.ourteam.product.ui.dao.ProductUIListOption[] aProductUIListOptions,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductUIListOptions)) {
      return new ProductUIListOptionBean[0];
    }

    int length = aProductUIListOptions.length;

    ProductUIListOptionBean[] beans = new ProductUIListOptionBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductUIListOptionBean(aProductUIListOptions[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductUIListOptions[i]});
      }
    }

    return beans;
  }
}
